/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class ChildTracker {
    static categoryCode = '010020043';

    static categoryName = '儿童定位器';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return ChildTracker.categoryCode;
    }

    get categoryName() {
        return ChildTracker.categoryName;
    }

    getGpsPosition(params) {
        return command({
            method: 'getGpsPosition',
            methodId: 'pZgRtGro',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getLightSwitch(params) {
        return command({
            method: 'getLightSwitch',
            methodId: 'pDrhEc2z',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getRingSwitch(params) {
        return command({
            method: 'getRingSwitch',
            methodId: 'p1vFB8uW',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSignalIntensity(params) {
        return command({
            method: 'getSignalIntensity',
            methodId: 'pGox72mR',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setLightSwitch(params) {
        return command({
            method: 'setLightSwitch',
            methodId: 'pUPQO331',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setOrientation(params) {
        return command({
            method: 'setOrientation',
            methodId: 'peHyqSEq',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setRingSwitch(params) {
        return command({
            method: 'setRingSwitch',
            methodId: 'ppAXiV1k',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default ChildTracker;
